package com.tfjybj.itoo.teach.provider.service.impl;

/*
  @auther 井朝
  @DESCRIPTION
  RabbitMq的消费者
  处理ChooseCourseServiceImpl中选课业务的选课/退课操作
  @since 1.0.8 2018/11/12
*/

import com.rabbitmq.client.Channel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.listener.api.ChannelAwareMessageListener;
import org.springframework.transaction.annotation.Transactional;

public class MqConsumer implements ChannelAwareMessageListener {

    private Logger logger = LoggerFactory.getLogger(ChannelAwareMessageListener.class);

    @Override
    @Transactional(rollbackFor = Exception.class)
    public void onMessage(Message message, Channel channel) throws Exception {
        long deliveryTag = message.getMessageProperties().getDeliveryTag();
    }
}
